home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / NET / NETC22 / NETC22.VRF < prev    next >
Encoding:
Text File  |  1995-10-13  |  14.6 KB  |  326 lines

  1. /* Copyright (c) Oracle Corporation 1995.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     netc22.vrf - Windows 95 V3 installation verification script for SQL*Net.
  5.  
  6.   DESCRIPTION
  7.     This script checks dependencies and environment settings for installation
  8.     of the Windows 95 SQL*Net product.
  9.  
  10.   OWNER
  11.     Lav Jain
  12.  
  13.   MODIFIED    DD-MMM-YY Reason
  14.   
  15. *****************************************************************************/
  16. {
  17.  { doit = execute("%installer_home%\win95.vrf"); }
  18.   [
  19.     'UNBOUND_VARIABLE:
  20.       {
  21.         required_version = product_version(w95instver);
  22.         temp = explode(required_version,".");
  23.         required_version = implode(list(first(temp),first(rest(temp)),
  24.                                         first(rest(rest(temp))),
  25.                                         first(rest(rest(rest(temp))))),".");
  26.         signal('failure,instantiate(nls("instver_too_early1","The version of
  27. the Installer currently running is %%installer_version%%. The installation you
  28. have chosen requires version %%required_version%% or later. Please run version
  29. %%required_version%% or later in order to perform this installation.")));
  30.       }
  31.   ]
  32.  
  33.    /* We want to force the installation of SQL*Net client
  34.       if doit == false and tcp or spx are not installed
  35.       This restriction is imposed on by the installation of SQL*Net server */
  36.  if (not(doit) && (version_status == 'reinstall)) 
  37.    if (not(registered("w95tcp22")) && not(registered("w95spx22")))
  38.      doit = TRUE;
  39.  
  40.  if (doit)
  41.   {
  42.  
  43.     vrf_ratchet = "2.2.2.0.0";
  44.  
  45.     permit_retry_operations = FALSE;
  46.  
  47.   /* Bind string constants, help strings, & prompt strings .. */
  48.  
  49.     net2_register = nls("net2_register","Registering %%product_label%%...");
  50.  
  51.     net2_install_script = nls("net2_install_script","Installing %%product_label%% Installation Scripts...");
  52.  
  53.     net2_install_message = nls("net2_install_message","Installing %%product_label%% Message Files...");
  54.  
  55.     net2_install_sample = nls("net2_install_sample","Installing %%product_label%% Sample Files...");
  56.  
  57.     net2_install_easycfg = nls("net2_install_easycfg","Installing SQL*Net Easy Configuration Files...");
  58.  
  59.     net2_install_dll = nls("net2_install_dll","Installing %%product_label%% DLL's...");
  60.  
  61.   new_stack_prompt = nls("new_stack_prompt","Select the network protocols for which you want Oracle SQL*Net support.  SQL*Net allows you to access remote databases on your network.  For each protocol you select, an Oracle SQL*Net Protocol Adapter will be installed.
  62.  
  63. If possible, the Installer detects the network protocols installed to your Windows 95 system and selects them for you.");
  64.   new_stack_label = nls("new_stack_label","Oracle SQL*Net Adapter Selection");
  65.   new_stack_help = nls("new_stack_help","SQL*Net allows you to access remote databases on your network.  Select the network protocols for which you want Oracle SQL*Net support.  If possible, the Installer detects the network protocols installed to your Windows 95 system and selects them for you.
  66.  
  67. The TCP/IP network protocol enables data transfer on Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  68.  
  69. The SPX network protocol enables data transfer in a Novell Netware environment.
  70.  
  71. The Named Pipes network protocol enables data transfer in a Microsoft Network environment or LAN Manager environment.
  72.  
  73. If you are not familiar with network transport protocols, please contact your network administrator.
  74.  
  75.                                                                                                                                                             .
  76. ");
  77.   installation_terminated = nls("installation_terminated","Installation terminated.  Please stop all Oracle applications that are using %%product_label%%.");
  78.   reinstall_prompt = nls("reinstall_prompt","Oracle SQL*Net is currently installed to your machine. Would you like to:");
  79.   reinstall_label = nls("reinstall_label","Oracle SQL*Net Network Support");
  80.   reinstall_help = nls("reinstall_help","The Installer has examined your machine and found that SQL*Net is already installed.
  81.  
  82. To configure access to additional remote databases (add a Database Alias) please select the first checkbox.
  83.  
  84. To reinstall SQL*Net or add support for additional network protocols (add a SQL*Net Protocol Adapter) please select the second checkbox.
  85.  
  86. Press OK to continue or CANCEL to terminate this installation. ");
  87.  
  88.     netc22_expl = nls("netc22_expl", "A %%product_label%% DLL (NTNT.DLL) is being used on this machine. Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  89.  
  90. Silent mode installation of %%product_label%% terminated.");
  91.  
  92.     netc22_inst = instantiate(nls("netc22_inst", "A %%product_label%% DLL (NTNT.DLL) is being used on this machine. Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  93.  
  94. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  95.  
  96. Choose CANCEL to terminate the installation of %%product_label%%.
  97.     "));
  98.     netc22_inst_term = instantiate(nls("netc22_inst_term", "%%product_label%% installation terminated."));
  99.     netc22_inst_content = instantiate(nls("netc22_inst_content", "%%product_label%% DLL Used"));
  100.     netc22_inst_help = instantiate(nls("netc22_inst_help", "The Oracle Installer has detected that a %%product_label%% DLL (NTNT.DLL) is being used on this machine.  Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  101.  
  102. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  103.  
  104. Choose CANCEL to terminate the installation of %%product_label%%.
  105.     "));
  106.  
  107.    use_installer_from_media = nls("use_installer_from_media","SQL*Net Easy Configuration depends on the Oracle Installer. The Oracle Installer you are currently using is not compatible to run SQL*Net Easy Configuration. Please run the Oracle Installer from the release media in order to install the latest version of Oracle Installer and %product_label%.");
  108.    use_installer_from_media_label = nls("use_installer_from_media_label","Oracle Installer Not Compatible");
  109.    use_installer_from_media_help_term = nls("use_installer_from_media_help_term","SQL*Net Easy Configuration is installed together with %product_label%. SQL*Net Easy Configuration is dependent on the Oracle Installer. Your current Oracle Installer is not compatible with this version of SQL*Net Easy Configuration. Please run the Oracle Installer from the release media in order to install the latest version of Oracle Installer and %product_label%.
  110.  
  111. OK or CANCEL terminates the installation of %product_label% .
  112.    ");
  113.  
  114.    use_installer_from_media_help_cont = nls("use_installer_from_media_help_cont","SQL*Net Easy Configuration is installed together with %product_label%. SQL*Net Easy Configuration is dependent on the Oracle Installer. Your current Oracle Installer is not compatible with this version of SQL*Net Easy Configuration. Please run the Oracle Installer from the release media in order to install the latest version of Oracle Installer and %product_label%.
  115.  
  116. OK continues with the installation of other products.
  117.  
  118. CANCEL terminates the installation of %product_label%.
  119.    ");
  120.  
  121.    none_selected = nls("none_selected","No Oracle SQL*Net Protocol Adapter was selected for installation.");
  122.    none_selected_label = nls("none_selected_label","None Selected");
  123.  
  124.    none_selected_help_term = nls("none_selected_help_term","No Oracle SQL*Net Protocol Adapter was selected for installation.
  125.  
  126. You need to select at least one network protocol in order to install %product_label%. 
  127.  
  128. BACK returns to %new_stack_label% dialog box to make a selection.
  129.  
  130. OK or CANCEL terminates the installation of %product_label% .
  131.    ");
  132.  
  133.    none_selected_help_cont = nls("none_selected_help_cont","No Oracle SQL*Net Protocol Adapter was selected for installation.
  134.  
  135. You need to select at least one network protocol in order to install %product_label%.
  136.  
  137. BACK returns to %new_stack_label% dialog box to make a selection.
  138.  
  139. OK continues with the installation of other products.
  140.  
  141. CANCEL terminates the installation of %product_label%.
  142.    ");
  143.  
  144.  
  145.     no_protocol = nls("no_protocol","The Oracle Installer did not detect TCP/IP, SPX or Named Pipes protocols on your machine.
  146.  
  147. Before installing SQL*Net, you must install either TCP/IP, SPX or Named Pipes.");
  148.     no_protocol_label =  nls("no_protocol_label","No Protocol Detected");
  149.     no_protocol_help = nls("no_protocol_help","The Oracle Installer did not detect TCP/IP, SPX or Named Pipes protocols on your machine.
  150.  
  151. Before installing SQL*Net, you must install either TCP/IP, SPX or Named Pipes.
  152.  
  153. The TCP/IP network protocol enables data transfer on Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  154.  
  155. The SPX network protocol enables data transfer in a Novell Netware environment.
  156.  
  157. The Named Pipes network protocol enables data transfer in a Microsoft Network environment or LAN Manager environment.
  158.  
  159. If you are not familiar with network transport protocols, please contact your network administrator.");
  160.  
  161.  
  162.    done = FALSE;
  163.    while(not(done))
  164.    { move_file("%ORACLE_HOME%\bin\ntnt.dll", "%ORACLE_HOME%\bin\ntnt.dll"); done = TRUE;}
  165.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  166.       {
  167.         if (silent_mode)
  168.           signal('FAILURE, instantiate(netc22_expl));
  169.         else
  170.           information_dialog(instantiate(netc22_inst), netc22_inst_content, instantiate(netc22_inst_help));
  171.       }
  172.       'FILE_NOT_FOUND:
  173.         done = TRUE;
  174.     ]                       
  175.  
  176. /* Determine which type of install - only Custom Install asks questions */
  177.    {
  178.    if (install_type == install_type_custom)
  179.         custom_install = TRUE;
  180.    else
  181.         custom_install = FALSE;
  182.    }
  183.    [ 'UNBOUND_VARIABLE: custom_install = TRUE; ]
  184.  
  185.    chosen_stack_list = list();
  186.    spx_stack = "";
  187.    tcp_stack = "";
  188.    nmp_stack = "";
  189.  
  190.  
  191.    stack_list = list();
  192.    installed_stack_list = list();
  193.    tcp_stack = nls("tcp_stack","TCP/IP         ");
  194.    spx_stack = nls("spx_stack","SPX              ");
  195.    nmp_stack = nls("nmp_stack","Named Pipes");
  196.    increment = 0;
  197.    while (increment < 100)
  198.    {
  199.      if (increment > 9)
  200.        increment_string = "%increment%";
  201.      else
  202.        increment_string = "0%increment%";
  203.      temp_string = win32_get_value("HKEY_LOCAL_MACHINE",
  204.                                    "System\CurrentControlSet\Services\Class\NetTrans\00%increment_string%",
  205.                                    "DeviceVxDs");
  206.      temp_list = explode(temp_string,",", 'STRINGSONLY);
  207.      if (member(temp_list, "vtcp.386"))
  208.        add(installed_stack_list, tcp_stack);
  209.      else if (member(temp_list, "nwlink.vxd"))
  210.        add(installed_stack_list, spx_stack);
  211.      else if (member(temp_list, "netbeui.vxd"))
  212.        add(installed_stack_list, nmp_stack);
  213.      increment = increment + 1;
  214.    }
  215.    ['INVALID_KEY, 'FILE_NOT_FOUND, 'OS_ERROR: increment = increment + 1;]
  216.  
  217.    if (not(member(installed_stack_list, tcp_stack)))
  218.      tcp_stack = nls("tcp_stack_not_installed","%tcp_stack% (Protocol not detected)");
  219.    add(stack_list, tcp_stack);
  220.      
  221.    if (not(member(installed_stack_list, spx_stack)))
  222.      spx_stack = nls("spx_stack_not_installed","%spx_stack% (Protocol not detected)");
  223.    add(stack_list, spx_stack);
  224.  
  225.    if (not(member(installed_stack_list, nmp_stack)))
  226.      nmp_stack = nls("nmp_stack_not_installed","%nmp_stack% (Protocol not detected)");
  227.    add(stack_list, nmp_stack);
  228.  
  229.    if (empty(installed_stack_list))
  230.    {
  231.         information_dialog(no_protocol, no_protocol_label, no_protocol_help, 'NO_CANCEL);
  232.         if (custom_install && member(selected_products, w95netclt22) && empty(rest(selected_products)))
  233.         {
  234.            signal('CANCEL,netc22_inst_term);
  235.         }
  236.         else
  237.         {
  238.            doit = false;
  239.            return(0);
  240.         }
  241.    }
  242.  
  243.    total_w95install = 0;
  244.    if (not(registered("w95install")))
  245.       total_w95install = verify(w95install);
  246.    else
  247.    if (earlier_version(registration("w95install"),product_version(w95instver)))
  248.       {
  249.       total_w95install = verify(w95install);
  250.       }
  251.       ['FAILURE:
  252.         {
  253.           if (member(selected_products, w95netclt22) && empty(rest(selected_products))) 
  254.           {
  255.             information_dialog(use_installer_from_media,use_installer_from_media_label,use_installer_from_media_help_term);
  256.             signal('CANCEL,netc22_inst_term);
  257.           }
  258.           else
  259.           {
  260.             information_dialog(use_installer_from_media,use_installer_from_media_label,use_installer_from_media_help_cont);
  261.             doit = FALSE;
  262.             return (0);
  263.           }
  264.         }
  265.       ]
  266.  
  267.    chosen_stack_list = installed_stack_list;
  268.    if (custom_install)
  269.    mark
  270.    {
  271.         chosen_stack_list = multiple_selection_dialog( new_stack_prompt,
  272.                                                        stack_list,
  273.                                                        installed_stack_list,
  274.                                                        new_stack_label,
  275.                                                        new_stack_help );
  276.         if (empty(chosen_stack_list))
  277.         mark
  278.         {
  279.              /* if this is the only product installed */
  280.              if (member(selected_products, w95netclt22) && empty(rest(selected_products)))
  281.              {
  282.                information_dialog(none_selected, none_selected_label, none_selected_help_term);
  283.                signal('CANCEL,netc22_inst_term);
  284.              }
  285.              else
  286.              {
  287.                information_dialog(none_selected, none_selected_label, none_selected_help_cont);
  288.                doit = false;
  289.                return(0);
  290.              }
  291.         }
  292.    }
  293.    total = 0;
  294.  
  295.    if (member(chosen_stack_list, tcp_stack))
  296.         total = total + verify(w95tcp22);
  297.    if (member(chosen_stack_list, spx_stack))
  298.         total = total + verify(w95spx22);
  299.    if (member(chosen_stack_list, nmp_stack))
  300.         total = total + verify(w95nmp22);
  301.    if (total == 0)
  302.    {
  303.      if (member(selected_products, w95netclt22) && empty(rest(selected_products))) 
  304.      {
  305.        information_dialog(nls("none_selected","No Oracle SQL*Net Protocol Adapter was selected for installation."));
  306.        signal('CANCEL,netc22_inst_term);
  307.      }
  308.      else
  309.      {
  310.        doit = FALSE;
  311.        return (0);
  312.      }
  313.    }
  314.    total = total + total_w95install + verify(w95rsf72);
  315.  
  316.    return(total + sum(dll,exec,msb,nls_abbreviation,sample,deinstl,cfg22));
  317.  
  318.   }
  319.  else
  320.   {
  321.    refresh_map_file = FALSE;
  322.    return(0);
  323.   }
  324. }
  325.  
  326.